<template>
  <div class="article-create">
    <el-card>
      <el-input
        :placeholder="$t('msg.article.titlePlaceholder')"
        maxlength="20"
        v-model="title"
        clearable
        style="margin-bottom: 20px"
      >
      </el-input>

      <el-tabs v-model="activeName">
        <el-tab-pane :label="$t('msg.article.markdown')" name="markdown"
          >
            <markdown :title="title" @Success="success"></markdown>
          </el-tab-pane
        >
        <el-tab-pane :label="$t('msg.article.richText')" name="editor"
          >
            <editor :title="title" @Success="success"></editor>
          </el-tab-pane
        >
      </el-tabs>
    </el-card>
  </div>
</template>

<script>
import Editor from "./components/Editor.vue"
import Markdown from "./components/Markdown.vue"
export default {
  components: {
      Editor,
      Markdown
  },
  data() {
    return {
      title: "",
      activeName: "markdown",
    };
  },
  mounted() {},
  methods: {
      success(){
          this.title = ""
      }
  },
};
</script>

<style scoped >
</style>
